package com.agilegroup.crm.requests;

import static com.agilegroup.crm.utils.CONSTANTS.*;

import java.util.ArrayList;

import com.agilegroup.crm.model.Appointment;
import com.octo.android.robospice.request.springandroid.SpringAndroidSpiceRequest;

public class ViewAppointmentJsonRequest extends SpringAndroidSpiceRequest<Appointment>{

	private ArrayList<String>parameters;
	
	public ViewAppointmentJsonRequest(ArrayList<String>parameters) {
		super(Appointment.class);
		this.parameters=parameters;
	}
	
	@Override
	public Appointment loadDataFromNetwork() throws Exception {
		return getRestTemplate().getForObject(singleappointmentsUrl+"id="+parameters.get(0)+"/empId="+parameters.get(1)+".json", Appointment.class);
	}
}
